package com.touzhijia.authority.domain.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

@ApiModel("更新权限")
@Data
public class PermissionUpdateReq implements Serializable {

    /**
     * 模块名称
     */
    @ApiModelProperty("模块名称")
    @Pattern(regexp = "[\\s\\S]*\\S+[\\s\\S]*", message = "不能是空字符")
    @Length(max = 128)
    private String module;

    /**
     * 权限标题
     */
    @ApiModelProperty("权限标题")
    @Pattern(regexp = "[\\s\\S]*\\S+[\\s\\S]*", message = "不能是空字符")
    @Length(max = 255)
    private String title;

    /**
     * 权限标识字符串
     */
    @ApiModelProperty("权限标识字符串")
    @Pattern(regexp = "[\\s\\S]*\\S+[\\s\\S]*", message = "不能是空字符")
    @Length(max = 255)
    private String permission;

    /**
     * 权限说明
     */
    @ApiModelProperty("权限说明")
    @Pattern(regexp = "[\\s\\S]*\\S+[\\s\\S]*", message = "不能是空字符")
    @Length(max = 2000)
    private String description;
}
